home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_08_1985_Transactor_Publishing.d64 / menu prg (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  909b  |  36 lines

  1. 10 rem menu routine
  2. 15 rem tim buist
  3. 16 rem 2723 colton st. e.
  4. 17 rem grand rapids mi 49506
  5. 20 rem array a$() contains menu options
  6. 30 :
  7. 40 a$(1)="edit":a$(2)="format":a$(3)="load":a$(4)="save"
  8. 50 a$(5)="list":a$(6)="margin"
  9. 60 n=6: rem # of items
  10. 70 gosub 110
  11. 80 printchr$(147)"option"i":"a$(i)
  12. 85 rem on i goto 1000,2000,3000, etc.
  13. 90 end
  14. 95 :
  15. 100 rem* menu subroutine *
  16. 110 cd$=chr$(17): cu$=chr$(145)
  17. 115 hi$="": off$="[146]"
  18. 120 aa=(25-n*2)/2
  19. 125 print"[147][213]se cursor or joystick up/down to select"
  20. 130 fori=1 to aa: print: next
  21. 140 fori=1ton: printtab(20-len(a$(i))/2);off$;a$(i): print: next
  22. 150 print chr$(19)
  23. 160 fori=1 to aa:print: next: i=1
  24. 170 printtab(20-len(a$(i))/2);hi$;a$(i)
  25. 175 get a$
  26. 176 j=peek(56320): rem 56321 for joy #2
  27. 177 if j=111 then a$=chr$(13)
  28. 178 if j=125 then a$=cd$
  29. 179 if j=126 then a$=cu$
  30. 180 if a$<>cd$ and a$<>cu$ and a$<>chr$(13) then 175
  31. 190 if a$=chr$(13) then return
  32. 200 printcu$;tab(20-len(a$(i))/2);off$;a$(i)
  33. 210 if a$=cd$ then print: i=i+1: if i>n then 150
  34. 220 if a$=cu$ then print cu$cu$cu$;: i=i-1: ifi<1then150
  35. 230 goto170
  36.